
const tokenName = 'my-token'
/**
 * @description 本地化存储token
 * @param {*} data 存储后端返回的token字符串
 */
export function saveToken(data) {
  localStorage.setItem(tokenName, data)
}
/**
 * @description 从本地取出token
 */
export function getToken() {
  return localStorage.getItem(tokenName)
}

export function clearToken() {
  localStorage.clear()
}
